-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Prop defs node spike #29476
base: master
Are you sure you want to change the base?
feat: Prop defs node spike #29476
Conversation
👋 silly question I should have asked this morning: didn't we used to process property defs in a NodeJS service, prior to the existence of |
45f677b
to
312e150
Compare
… feat/node-prop-defs # Conflicts: # plugin-server/src/property-defs/property-defs-consumer.test.ts # plugin-server/src/property-defs/property-defs-consumer.ts # plugin-server/src/types.ts
…xtraction; filter inline during extraction
…fetches; batch all event and prop writes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces property definitions functionality to the PostHog plugin server, moving the implementation from Rust to Node.js for performance evaluation.
- Added new
PropertyDefsConsumer
in/plugin-server/src/property-defs/property-defs-consumer.ts
to process and store property definitions from Kafka events - Implemented
PropertyDefsDB
in/plugin-server/src/property-defs/services/property-defs-db.ts
for handling database operations with proper upsert logic - Added configuration options in
config.ts
for controlling property definitions consumer behavior, including team-specific enabling and write disabling - Added comprehensive type inference utilities in
property-defs-utils.ts
for determining property types from values - Modified
GroupTypeManager
andTeamManager
to support batch operations and improved caching for property definitions
Note: There are some TODOs around project_id implementation and timestamp handling that need to be addressed.
13 file(s) reviewed, 14 comment(s)
Edit PR Review Bot Settings | Greptile
Problem
Needs #29772
We want to experiment with prop defs in Node to get a real life feel for perf and to determine if this is our way forward (it's a spike to gather data fast rather than to become a big discussion - we want to get data to inform future decisions)
This is good enough now to get something running, doing the parsing so we can check out the cpu profile etc.
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?